# -*- coding: utf-8 -*-

crawlerUrls = """select 
                    url 
                  from 
                    crawler_urls 
                  where 
                    tag like '{tag}%%'"""

### 二手房*Owner ###
esf_owner_get = """select
                      id, title, created_time, published_time, updated_time 
                   from
                      crawler_ershoufang_owner
                   where 
                      house_id='{house_id}' and web_code='{web_code}'"""

esf_owner_update_status = """update
                                crawler_ershoufang_owner 
                             set 
                                published_time='{published_time}', title='{title}', is_new='0' 
                             where 
                                house_id='{house_id}' and web_code='{web_code}'"""

esf_owner_update = """update 
                        crawler_ershoufang_owner 
                      set 
                        %s 
                      where 
                        %s"""

esf_owner_insert = """insert into 
                        crawler_ershoufang_owner(%s) 
                      values
                        (%s)"""

### 出租房*Owner ###
rent_owner_get = """select
                      id, title, created_time, published_time, updated_time 
                   from
                      crawler_chuzu_owner
                   where 
                      house_id='{house_id}' and web_code='{web_code}'"""

rent_owner_update_status = """update
                                crawler_chuzu_owner 
                             set 
                                published_time='{published_time}', is_new='0' 
                             where 
                                house_id='{house_id}' and web_code='{web_code}'"""

rent_owner_update = """update 
                        crawler_chuzu_owner 
                      set 
                        %s 
                      where 
                        %s"""

rent_owner_insert = """insert into 
                        crawler_chuzu_owner(%s) 
                      values
                        (%s)"""
